#include <stdio.h>
#include <math.h>

int main() {
    int num = 0;
    int len = 0;
    int ret = 0;
    int sum = 0;
    scanf("%d%d", &num, &len);
    for (int i = 1; i <= len; i++) {
        ret += num * pow(10, i);
        sum += ret;
    }
    printf("%d", sum);
    return 0;
}